﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VirtualPress.Infrastructure.Entities.Repository;

namespace VirtualPress.Infrastructure.Entities.Entity
{
    public class ImportantPan : IAccessible<C_ImportantPan, ImportantPan>, ILogicEntity<C_ImportantPan, ImportantPan>
    {
        #region
        public int Id { get; set; }

        public int meetingId { get; set; }

        public string Title { get; set; }

        public DateTime PanDate { get; set; }

        public DateTime CreateDate { get; set; }
        #endregion


        protected override void Covariant(C_ImportantPan model)
        {
            if (model != null)
            {
                this.Id = model.Id;
                this.meetingId = model.meetingId;
                this.Title = model.Title;
                this.PanDate = model.PanDate;
                this.CreateDate = model.CreateDate;
            }
        }

        protected override C_ImportantPan Inverter(ImportantPan model)
        {
            if (model != null)
            {
                return new C_ImportantPan()
                {
                    CreateDate = model.CreateDate,
                    Id = model.Id,
                    meetingId = model.meetingId,
                    PanDate = model.PanDate,
                    Title = model.Title
                };
            }
            return null;
        }

        public ImportantPan Set(C_ImportantPan dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
